<?php

class backmessModel extends Model {

    private $table = '`sd_backmess`';

    public function add($data) {        
        return $this->_insert($this->table, $data);
    }
    
    public function del($id){
        return $this->_query("DELETE FROM" . $this->table . " WHERE art_id = " . $id);
    }
    
    public function getallart($id){
       return $this->_all("SELECT * FROM `sd_backmess` where art_id = {$id}");
    }
      
//    public function updateart($data,$id){
//        $where = "WHERE art_id = " . $id;
//        Return $this->_update($this->table, $data, $where);
//    }
//    public function delart($id){
//        return $this->_query("DELETE FROM" . $this->table . " WHERE art_id = " . $id);
//    }
//    
//    public function getoneart($id){
//        return $this->_row("SELECT * FROM `sd_art` where art_id = {$id}");
//    }

}